#!/bin/bash
# zsh are not support !!!!!


#安装jdk、jre
sudo apt install -y default-jdk default-jre
#添加GPG keys
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
    https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key

#添加Jenkins镜像地址
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee  /etc/apt/sources.list.d/jenkins.list > /dev/null
#安装Jenkins
sudo apt update
sudo apt install -y jenkins
#启动Jenkins
sudo /etc/init.d/jenkins start